package common.conversion
{
	public class MathUtilX
	{
		public static const WAN:uint = 10000;
		
		public static var PI2:Number = Math.PI * 2;
		public function MathUtilX()
		{
		}
		
		public static function getTwoPointAngle( x0:Number, y0:Number, toX:Number, toY:Number ):Number
		{
			var xx:int = toX - x0;
			var yy:int = toY - y0;
			var len:Number = Math.sqrt( xx*xx + yy*yy );
			var f:Number = xx/len;
			var radian:Number = Math.acos( f );
			if( yy > 0 )
			{
				radian = PI2 - radian;
			}
			radian = PI2 - radian;
			
			return radian;
		}
		
		public static function getLine(a:Number,b:Number):Number{
			var c:Number = Math.pow(a,2)+Math.pow(b,2);
			return Math.sqrt(c);
		}
	}
}